USE [autojsp]
GO

/****** Object:  Table [dbo].[SQLMAP]    Script Date: 06/22/2014 17:11:34 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[SQLMAP](
	[domain_name] [varchar](50) NOT NULL,
	[sql_ref] [varchar](100) NOT NULL,
	[sql_stmt] [varchar](4000) NULL,
	[sql_type] [char](1) NOT NULL,
	[start_date] [datetime] NOT NULL,
	[end_date] [datetime] NOT NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'域名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SQLMAP', @level2type=N'COLUMN',@level2name=N'domain_name'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'C|R|U|D|P|F|' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SQLMAP', @level2type=N'COLUMN',@level2name=N'sql_type'
GO

ALTER TABLE [dbo].[SQLMAP] ADD  CONSTRAINT [DF_SQLMAP_start_date]  DEFAULT (getdate()) FOR [start_date]
GO

ALTER TABLE [dbo].[SQLMAP] ADD  CONSTRAINT [DF_SQLMAP_end_date]  DEFAULT (CONVERT([datetime],'2050-12-31 23:59:59',0)) FOR [end_date]
GO


